
package com.amit.Basic_Simple_Program;

import java.util.Scanner;

public class Prime_Number_Generation {

	public static void main(String[] args) 
	{

		System.out.println("Please enter the number u wnat o show prime number");
		
		Scanner sc=new Scanner(System.in);
		
		int n=sc.nextInt();
		
		
		for(int i=2;i<=n;i++)
		{
			boolean flag=true;
			
			for(int j=2;j<=i/2;j++)
			{
				if(i%j==0)
				{
					flag=false;
					break;
				}
				
			}
			if(flag)
			{
			
				System.out.println(i);
			}
			
			
		}
		
	}

}
